class fx:
	n=2
	def f(self,x):
		if x%self.n==0:
			return True
		else:
			return False
            
def f(x):
    if x%2==0:
        return True
    else:
        return False
        
s=[i for i in range(10,30,2)]
print('class methon:')
c=fx()
d = filter(c.f,s)
for i in d:
    print(i)
print('origin function:')
d1 = filter(f,s)
for i in d1:
    print(i)
